{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "0fd7e738",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>accidenttime</th>\n",
       "      <th>accidentaddr</th>\n",
       "      <th>driver1fault</th>\n",
       "      <th>driver1responsibility</th>\n",
       "      <th>driver2responsibility</th>\n",
       "      <th>sex1</th>\n",
       "      <th>platenumber1</th>\n",
       "      <th>carcolor1</th>\n",
       "      <th>sex2</th>\n",
       "      <th>platenumber2</th>\n",
       "      <th>...</th>\n",
       "      <th>jxmc1</th>\n",
       "      <th>jxmc2</th>\n",
       "      <th>cclzrq1</th>\n",
       "      <th>cclzrq2</th>\n",
       "      <th>clpp1</th>\n",
       "      <th>clpp2</th>\n",
       "      <th>driver1license</th>\n",
       "      <th>driver2license</th>\n",
       "      <th>brith1</th>\n",
       "      <th>brith2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2015-2-4 8:23</td>\n",
       "      <td>花溪大道北段</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AVG423</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A74653</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>贵大驾校</td>\n",
       "      <td>-1</td>\n",
       "      <td>2013-6-7 0:00</td>\n",
       "      <td>朗逸牌</td>\n",
       "      <td>新感觉</td>\n",
       "      <td>3.65E+16</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>985082</td>\n",
       "      <td>199006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2015-2-4 8:40</td>\n",
       "      <td>花溪区孟关乡</td>\n",
       "      <td>3、倒车的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AKC352</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A6156A</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>贵州省长安驾驶培训学校</td>\n",
       "      <td>-1</td>\n",
       "      <td>2013-9-16 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>起亚牌</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196904</td>\n",
       "      <td>199402</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2015-2-4 7:20</td>\n",
       "      <td>白金大道</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A24876</td>\n",
       "      <td>蓝</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AN6491</td>\n",
       "      <td>...</td>\n",
       "      <td>鑫鑫驾校</td>\n",
       "      <td>-1</td>\n",
       "      <td>2006-11-30 0:00</td>\n",
       "      <td>-1</td>\n",
       "      <td>华神牌</td>\n",
       "      <td>银翔牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196907</td>\n",
       "      <td>198508</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2015-2-4 9:20</td>\n",
       "      <td>金阳</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7287L</td>\n",
       "      <td>黑</td>\n",
       "      <td>0</td>\n",
       "      <td>贵A7088C</td>\n",
       "      <td>...</td>\n",
       "      <td>消防驾校</td>\n",
       "      <td>520116</td>\n",
       "      <td>2004-6-17 0:00</td>\n",
       "      <td>2008-5-29 0:00</td>\n",
       "      <td>众泰牌</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197512</td>\n",
       "      <td>197906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2015-2-4 9:00</td>\n",
       "      <td>新华路</td>\n",
       "      <td>9、不符合前8款规定或者双方同时具有上述情形的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU1522</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A68C55</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2006-1-23 0:00</td>\n",
       "      <td>2012-9-14 0:00</td>\n",
       "      <td>大众牌</td>\n",
       "      <td>海马牌</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197209</td>\n",
       "      <td>197701</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18036</th>\n",
       "      <td>2015-5-10 22:26</td>\n",
       "      <td>贵开路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7294C</td>\n",
       "      <td>红</td>\n",
       "      <td>1</td>\n",
       "      <td>贵CHT461</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2004-1-13 0:00</td>\n",
       "      <td>2014-11-5 0:00</td>\n",
       "      <td>俊风牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>198507</td>\n",
       "      <td>198202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18037</th>\n",
       "      <td>2015-2-5 17:20</td>\n",
       "      <td>林城西路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT6092</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAS408</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-11-11 0:00</td>\n",
       "      <td>2001-12-31 0:00</td>\n",
       "      <td>英伦牌</td>\n",
       "      <td>银钢牌</td>\n",
       "      <td>3.56E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>197206</td>\n",
       "      <td>198008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18038</th>\n",
       "      <td>2015-4-16 12:30</td>\n",
       "      <td>金珠大道</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HCU696</td>\n",
       "      <td>银</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A67R99</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-19 0:00</td>\n",
       "      <td>2014-2-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196401</td>\n",
       "      <td>195712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18039</th>\n",
       "      <td>2015-2-12 13:01</td>\n",
       "      <td>蟠桃宫</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HV8443</td>\n",
       "      <td>蓝</td>\n",
       "      <td>0</td>\n",
       "      <td>贵JDN385</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2003-5-22 0:00</td>\n",
       "      <td>2000-12-27 0:00</td>\n",
       "      <td>纳智捷牌</td>\n",
       "      <td>东风标致牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>197905</td>\n",
       "      <td>196405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18040</th>\n",
       "      <td>2015-3-16 8:00</td>\n",
       "      <td>大理石路</td>\n",
       "      <td>8、依法应负全责的其他情形</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵B34129</td>\n",
       "      <td>黑色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AYY148</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-15 0:00</td>\n",
       "      <td>2003-10-11 0:00</td>\n",
       "      <td>长城牌</td>\n",
       "      <td>五菱牌</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>197307</td>\n",
       "      <td>197202</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>18041 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          accidenttime accidentaddr             driver1fault  \\\n",
       "0        2015-2-4 8:23       花溪大道北段               7、未按规定让行的    \n",
       "1        2015-2-4 8:40       花溪区孟关乡                    3、倒车的   \n",
       "2        2015-2-4 7:20         白金大道                    1、追尾的   \n",
       "3        2015-2-4 9:20           金阳               7、未按规定让行的    \n",
       "4        2015-2-4 9:00          新华路  9、不符合前8款规定或者双方同时具有上述情形的   \n",
       "...                ...          ...                      ...   \n",
       "18036  2015-5-10 22:26          贵开路               7、未按规定让行的    \n",
       "18037   2015-2-5 17:20         林城西路               7、未按规定让行的    \n",
       "18038  2015-4-16 12:30         金珠大道                    1、追尾的   \n",
       "18039  2015-2-12 13:01          蟠桃宫               7、未按规定让行的    \n",
       "18040   2015-3-16 8:00         大理石路            8、依法应负全责的其他情形   \n",
       "\n",
       "      driver1responsibility driver2responsibility  sex1 platenumber1  \\\n",
       "0                     负全部责任                  不负责任     1      贵AVG423   \n",
       "1                     负全部责任                  不负责任     1      贵AKC352   \n",
       "2                     负全部责任                  不负责任     1      贵A24876   \n",
       "3                     负全部责任                  不负责任     1      贵A7287L   \n",
       "4                     负同等责任                 负同等责任     1      贵AU1522   \n",
       "...                     ...                   ...   ...          ...   \n",
       "18036                 负同等责任                 负同等责任     1      贵A7294C   \n",
       "18037                 负全部责任                  不负责任     1      贵GT6092   \n",
       "18038                 负全部责任                  不负责任     1      贵HCU696   \n",
       "18039                 负全部责任                  不负责任     1      贵HV8443   \n",
       "18040                 负全部责任                  不负责任     1      贵B34129   \n",
       "\n",
       "      carcolor1  sex2 platenumber2  ... jxmc1        jxmc2          cclzrq1  \\\n",
       "0            白色     1      贵A74653  ...    -1         贵大驾校               -1   \n",
       "1            白色     1      贵A6156A  ...    -1  贵州省长安驾驶培训学校               -1   \n",
       "2             蓝     1      贵AN6491  ...  鑫鑫驾校           -1  2006-11-30 0:00   \n",
       "3             黑     0      贵A7088C  ...  消防驾校       520116   2004-6-17 0:00   \n",
       "4            白色     1      贵A68C55  ...    自培           自培   2006-1-23 0:00   \n",
       "...         ...   ...          ...  ...   ...          ...              ...   \n",
       "18036         红     1      贵CHT461  ...    自培           自培   2004-1-13 0:00   \n",
       "18037         黑     1      贵AAS408  ...    自培           自培  2002-11-11 0:00   \n",
       "18038         银     1      贵A67R99  ...    自培           自培   2002-4-19 0:00   \n",
       "18039         蓝     0      贵JDN385  ...    自培           自培   2003-5-22 0:00   \n",
       "18040        黑色     1      贵AYY148  ...    自培           自培   2002-4-15 0:00   \n",
       "\n",
       "               cclzrq2 clpp1  clpp2 driver1license driver2license   brith1  \\\n",
       "0        2013-6-7 0:00   朗逸牌    新感觉       3.65E+16       3.67E+17  985082    \n",
       "1       2013-9-16 0:00   长安牌    起亚牌       3.55E+17       3.65E+17  196904    \n",
       "2                   -1   华神牌    银翔牌       3.66E+17       3.65E+17  196907    \n",
       "3       2008-5-29 0:00   众泰牌    长安牌       3.66E+17       3.65E+17  197512    \n",
       "4       2012-9-14 0:00   大众牌    海马牌       3.67E+17       3.65E+17  197209    \n",
       "...                ...   ...    ...            ...            ...      ...   \n",
       "18036   2014-11-5 0:00   俊风牌  北京现代牌       3.65E+17       3.67E+17  198507    \n",
       "18037  2001-12-31 0:00   英伦牌    银钢牌       3.56E+17       3.66E+17  197206    \n",
       "18038   2014-2-17 0:00   长安牌  北京现代牌       3.65E+17       3.65E+17  196401    \n",
       "18039  2000-12-27 0:00  纳智捷牌  东风标致牌       3.66E+17       3.67E+17  197905    \n",
       "18040  2003-10-11 0:00   长城牌    五菱牌       3.55E+17       3.55E+17  197307    \n",
       "\n",
       "        brith2  \n",
       "0      199006   \n",
       "1      199402   \n",
       "2      198508   \n",
       "3      197906   \n",
       "4      197701   \n",
       "...        ...  \n",
       "18036  198202   \n",
       "18037  198008   \n",
       "18038  195712   \n",
       "18039  196405   \n",
       "18040  197202   \n",
       "\n",
       "[18041 rows x 21 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "data = pd.read_csv(\"./data/accid1.csv\",encoding='gb18030')\n",
    "data = pd.DataFrame(data)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "852dd355",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>accidenttime</th>\n",
       "      <th>accidentaddr</th>\n",
       "      <th>driver1fault</th>\n",
       "      <th>driver1responsibility</th>\n",
       "      <th>driver2responsibility</th>\n",
       "      <th>sex1</th>\n",
       "      <th>platenumber1</th>\n",
       "      <th>carcolor1</th>\n",
       "      <th>sex2</th>\n",
       "      <th>platenumber2</th>\n",
       "      <th>...</th>\n",
       "      <th>jxmc1</th>\n",
       "      <th>jxmc2</th>\n",
       "      <th>cclzrq1</th>\n",
       "      <th>cclzrq2</th>\n",
       "      <th>clpp1</th>\n",
       "      <th>clpp2</th>\n",
       "      <th>driver1license</th>\n",
       "      <th>driver2license</th>\n",
       "      <th>brith1</th>\n",
       "      <th>brith2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2015-2-4 8:23</td>\n",
       "      <td>花溪大道北段</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AVG423</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A74653</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>贵大驾校</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2013-6-7 0:00</td>\n",
       "      <td>朗逸牌</td>\n",
       "      <td>新感觉</td>\n",
       "      <td>3.65E+16</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>985082</td>\n",
       "      <td>199006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2015-2-4 8:40</td>\n",
       "      <td>花溪区孟关乡</td>\n",
       "      <td>3、倒车的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AKC352</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A6156A</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>贵州省长安驾驶培训学校</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2013-9-16 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>起亚牌</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196904</td>\n",
       "      <td>199402</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2015-2-4 7:20</td>\n",
       "      <td>白金大道</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A24876</td>\n",
       "      <td>蓝</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AN6491</td>\n",
       "      <td>...</td>\n",
       "      <td>鑫鑫驾校</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2006-11-30 0:00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>华神牌</td>\n",
       "      <td>银翔牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196907</td>\n",
       "      <td>198508</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2015-2-4 9:20</td>\n",
       "      <td>金阳</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7287L</td>\n",
       "      <td>黑</td>\n",
       "      <td>0</td>\n",
       "      <td>贵A7088C</td>\n",
       "      <td>...</td>\n",
       "      <td>消防驾校</td>\n",
       "      <td>520116</td>\n",
       "      <td>2004-6-17 0:00</td>\n",
       "      <td>2008-5-29 0:00</td>\n",
       "      <td>众泰牌</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197512</td>\n",
       "      <td>197906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2015-2-4 9:00</td>\n",
       "      <td>新华路</td>\n",
       "      <td>9、不符合前8款规定或者双方同时具有上述情形的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU1522</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A68C55</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2006-1-23 0:00</td>\n",
       "      <td>2012-9-14 0:00</td>\n",
       "      <td>大众牌</td>\n",
       "      <td>海马牌</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197209</td>\n",
       "      <td>197701</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18036</th>\n",
       "      <td>2015-5-10 22:26</td>\n",
       "      <td>贵开路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7294C</td>\n",
       "      <td>红</td>\n",
       "      <td>1</td>\n",
       "      <td>贵CHT461</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2004-1-13 0:00</td>\n",
       "      <td>2014-11-5 0:00</td>\n",
       "      <td>俊风牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>198507</td>\n",
       "      <td>198202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18037</th>\n",
       "      <td>2015-2-5 17:20</td>\n",
       "      <td>林城西路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT6092</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAS408</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-11-11 0:00</td>\n",
       "      <td>2001-12-31 0:00</td>\n",
       "      <td>英伦牌</td>\n",
       "      <td>银钢牌</td>\n",
       "      <td>3.56E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>197206</td>\n",
       "      <td>198008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18038</th>\n",
       "      <td>2015-4-16 12:30</td>\n",
       "      <td>金珠大道</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HCU696</td>\n",
       "      <td>银</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A67R99</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-19 0:00</td>\n",
       "      <td>2014-2-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196401</td>\n",
       "      <td>195712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18039</th>\n",
       "      <td>2015-2-12 13:01</td>\n",
       "      <td>蟠桃宫</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HV8443</td>\n",
       "      <td>蓝</td>\n",
       "      <td>0</td>\n",
       "      <td>贵JDN385</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2003-5-22 0:00</td>\n",
       "      <td>2000-12-27 0:00</td>\n",
       "      <td>纳智捷牌</td>\n",
       "      <td>东风标致牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>197905</td>\n",
       "      <td>196405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18040</th>\n",
       "      <td>2015-3-16 8:00</td>\n",
       "      <td>大理石路</td>\n",
       "      <td>8、依法应负全责的其他情形</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵B34129</td>\n",
       "      <td>黑色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AYY148</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-15 0:00</td>\n",
       "      <td>2003-10-11 0:00</td>\n",
       "      <td>长城牌</td>\n",
       "      <td>五菱牌</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>197307</td>\n",
       "      <td>197202</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>18041 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          accidenttime accidentaddr             driver1fault  \\\n",
       "0        2015-2-4 8:23       花溪大道北段               7、未按规定让行的    \n",
       "1        2015-2-4 8:40       花溪区孟关乡                    3、倒车的   \n",
       "2        2015-2-4 7:20         白金大道                    1、追尾的   \n",
       "3        2015-2-4 9:20           金阳               7、未按规定让行的    \n",
       "4        2015-2-4 9:00          新华路  9、不符合前8款规定或者双方同时具有上述情形的   \n",
       "...                ...          ...                      ...   \n",
       "18036  2015-5-10 22:26          贵开路               7、未按规定让行的    \n",
       "18037   2015-2-5 17:20         林城西路               7、未按规定让行的    \n",
       "18038  2015-4-16 12:30         金珠大道                    1、追尾的   \n",
       "18039  2015-2-12 13:01          蟠桃宫               7、未按规定让行的    \n",
       "18040   2015-3-16 8:00         大理石路            8、依法应负全责的其他情形   \n",
       "\n",
       "      driver1responsibility driver2responsibility  sex1 platenumber1  \\\n",
       "0                     负全部责任                  不负责任     1      贵AVG423   \n",
       "1                     负全部责任                  不负责任     1      贵AKC352   \n",
       "2                     负全部责任                  不负责任     1      贵A24876   \n",
       "3                     负全部责任                  不负责任     1      贵A7287L   \n",
       "4                     负同等责任                 负同等责任     1      贵AU1522   \n",
       "...                     ...                   ...   ...          ...   \n",
       "18036                 负同等责任                 负同等责任     1      贵A7294C   \n",
       "18037                 负全部责任                  不负责任     1      贵GT6092   \n",
       "18038                 负全部责任                  不负责任     1      贵HCU696   \n",
       "18039                 负全部责任                  不负责任     1      贵HV8443   \n",
       "18040                 负全部责任                  不负责任     1      贵B34129   \n",
       "\n",
       "      carcolor1  sex2 platenumber2  ... jxmc1        jxmc2          cclzrq1  \\\n",
       "0            白色     1      贵A74653  ...   NaN         贵大驾校              NaN   \n",
       "1            白色     1      贵A6156A  ...   NaN  贵州省长安驾驶培训学校              NaN   \n",
       "2             蓝     1      贵AN6491  ...  鑫鑫驾校          NaN  2006-11-30 0:00   \n",
       "3             黑     0      贵A7088C  ...  消防驾校       520116   2004-6-17 0:00   \n",
       "4            白色     1      贵A68C55  ...    自培           自培   2006-1-23 0:00   \n",
       "...         ...   ...          ...  ...   ...          ...              ...   \n",
       "18036         红     1      贵CHT461  ...    自培           自培   2004-1-13 0:00   \n",
       "18037         黑     1      贵AAS408  ...    自培           自培  2002-11-11 0:00   \n",
       "18038         银     1      贵A67R99  ...    自培           自培   2002-4-19 0:00   \n",
       "18039         蓝     0      贵JDN385  ...    自培           自培   2003-5-22 0:00   \n",
       "18040        黑色     1      贵AYY148  ...    自培           自培   2002-4-15 0:00   \n",
       "\n",
       "               cclzrq2 clpp1  clpp2 driver1license driver2license   brith1  \\\n",
       "0        2013-6-7 0:00   朗逸牌    新感觉       3.65E+16       3.67E+17  985082    \n",
       "1       2013-9-16 0:00   长安牌    起亚牌       3.55E+17       3.65E+17  196904    \n",
       "2                  NaN   华神牌    银翔牌       3.66E+17       3.65E+17  196907    \n",
       "3       2008-5-29 0:00   众泰牌    长安牌       3.66E+17       3.65E+17  197512    \n",
       "4       2012-9-14 0:00   大众牌    海马牌       3.67E+17       3.65E+17  197209    \n",
       "...                ...   ...    ...            ...            ...      ...   \n",
       "18036   2014-11-5 0:00   俊风牌  北京现代牌       3.65E+17       3.67E+17  198507    \n",
       "18037  2001-12-31 0:00   英伦牌    银钢牌       3.56E+17       3.66E+17  197206    \n",
       "18038   2014-2-17 0:00   长安牌  北京现代牌       3.65E+17       3.65E+17  196401    \n",
       "18039  2000-12-27 0:00  纳智捷牌  东风标致牌       3.66E+17       3.67E+17  197905    \n",
       "18040  2003-10-11 0:00   长城牌    五菱牌       3.55E+17       3.55E+17  197307    \n",
       "\n",
       "        brith2  \n",
       "0      199006   \n",
       "1      199402   \n",
       "2      198508   \n",
       "3      197906   \n",
       "4      197701   \n",
       "...        ...  \n",
       "18036  198202   \n",
       "18037  198008   \n",
       "18038  195712   \n",
       "18039  196405   \n",
       "18040  197202   \n",
       "\n",
       "[18041 rows x 21 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#将数据中的所有含有-1的行删除\n",
    "import numpy as np\n",
    "data.replace('-1',np.NaN,inplace=True)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "7dc5bb8d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>accidenttime</th>\n",
       "      <th>accidentaddr</th>\n",
       "      <th>driver1fault</th>\n",
       "      <th>driver1responsibility</th>\n",
       "      <th>driver2responsibility</th>\n",
       "      <th>sex1</th>\n",
       "      <th>platenumber1</th>\n",
       "      <th>carcolor1</th>\n",
       "      <th>sex2</th>\n",
       "      <th>platenumber2</th>\n",
       "      <th>...</th>\n",
       "      <th>jxmc1</th>\n",
       "      <th>jxmc2</th>\n",
       "      <th>cclzrq1</th>\n",
       "      <th>cclzrq2</th>\n",
       "      <th>clpp1</th>\n",
       "      <th>clpp2</th>\n",
       "      <th>driver1license</th>\n",
       "      <th>driver2license</th>\n",
       "      <th>brith1</th>\n",
       "      <th>brith2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2015-2-4 9:20</td>\n",
       "      <td>金阳</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7287L</td>\n",
       "      <td>黑</td>\n",
       "      <td>0</td>\n",
       "      <td>贵A7088C</td>\n",
       "      <td>...</td>\n",
       "      <td>消防驾校</td>\n",
       "      <td>520116</td>\n",
       "      <td>2004-6-17 0:00</td>\n",
       "      <td>2008-5-29 0:00</td>\n",
       "      <td>众泰牌</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197512</td>\n",
       "      <td>197906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2015-2-4 9:00</td>\n",
       "      <td>新华路</td>\n",
       "      <td>9、不符合前8款规定或者双方同时具有上述情形的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU1522</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A68C55</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2006-1-23 0:00</td>\n",
       "      <td>2012-9-14 0:00</td>\n",
       "      <td>大众牌</td>\n",
       "      <td>海马牌</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197209</td>\n",
       "      <td>197701</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2015-2-4 8:00</td>\n",
       "      <td>中山东路</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAE424</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT7627</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>市警校驾校</td>\n",
       "      <td>2012-8-27 0:00</td>\n",
       "      <td>2012-9-4 0:00</td>\n",
       "      <td>宝来牌</td>\n",
       "      <td>威志牌</td>\n",
       "      <td>36454651104640395X</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>199402</td>\n",
       "      <td>198911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2015-2-4 11:00</td>\n",
       "      <td>小河锦江路</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵ANA964</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A9930E</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>鑫鑫驾校</td>\n",
       "      <td>2004-4-13 0:00</td>\n",
       "      <td>2013-12-17 0:00</td>\n",
       "      <td>朗逸牌</td>\n",
       "      <td>豪情牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197202</td>\n",
       "      <td>197911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2015-2-3 21:40</td>\n",
       "      <td>柴林巷</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A5BH44</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU8621</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>520109</td>\n",
       "      <td>2006-6-9 0:00</td>\n",
       "      <td>2009-9-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>瑞麒牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>196810</td>\n",
       "      <td>197602</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18036</th>\n",
       "      <td>2015-5-10 22:26</td>\n",
       "      <td>贵开路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7294C</td>\n",
       "      <td>红</td>\n",
       "      <td>1</td>\n",
       "      <td>贵CHT461</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2004-1-13 0:00</td>\n",
       "      <td>2014-11-5 0:00</td>\n",
       "      <td>俊风牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>198507</td>\n",
       "      <td>198202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18037</th>\n",
       "      <td>2015-2-5 17:20</td>\n",
       "      <td>林城西路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT6092</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAS408</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-11-11 0:00</td>\n",
       "      <td>2001-12-31 0:00</td>\n",
       "      <td>英伦牌</td>\n",
       "      <td>银钢牌</td>\n",
       "      <td>3.56E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>197206</td>\n",
       "      <td>198008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18038</th>\n",
       "      <td>2015-4-16 12:30</td>\n",
       "      <td>金珠大道</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HCU696</td>\n",
       "      <td>银</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A67R99</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-19 0:00</td>\n",
       "      <td>2014-2-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196401</td>\n",
       "      <td>195712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18039</th>\n",
       "      <td>2015-2-12 13:01</td>\n",
       "      <td>蟠桃宫</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HV8443</td>\n",
       "      <td>蓝</td>\n",
       "      <td>0</td>\n",
       "      <td>贵JDN385</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2003-5-22 0:00</td>\n",
       "      <td>2000-12-27 0:00</td>\n",
       "      <td>纳智捷牌</td>\n",
       "      <td>东风标致牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>197905</td>\n",
       "      <td>196405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18040</th>\n",
       "      <td>2015-3-16 8:00</td>\n",
       "      <td>大理石路</td>\n",
       "      <td>8、依法应负全责的其他情形</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵B34129</td>\n",
       "      <td>黑色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AYY148</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-15 0:00</td>\n",
       "      <td>2003-10-11 0:00</td>\n",
       "      <td>长城牌</td>\n",
       "      <td>五菱牌</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>197307</td>\n",
       "      <td>197202</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8956 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          accidenttime accidentaddr             driver1fault  \\\n",
       "3        2015-2-4 9:20           金阳               7、未按规定让行的    \n",
       "4        2015-2-4 9:00          新华路  9、不符合前8款规定或者双方同时具有上述情形的   \n",
       "6        2015-2-4 8:00         中山东路                    1、追尾的   \n",
       "8       2015-2-4 11:00        小河锦江路                    1、追尾的   \n",
       "9       2015-2-3 21:40          柴林巷               7、未按规定让行的    \n",
       "...                ...          ...                      ...   \n",
       "18036  2015-5-10 22:26          贵开路               7、未按规定让行的    \n",
       "18037   2015-2-5 17:20         林城西路               7、未按规定让行的    \n",
       "18038  2015-4-16 12:30         金珠大道                    1、追尾的   \n",
       "18039  2015-2-12 13:01          蟠桃宫               7、未按规定让行的    \n",
       "18040   2015-3-16 8:00         大理石路            8、依法应负全责的其他情形   \n",
       "\n",
       "      driver1responsibility driver2responsibility  sex1 platenumber1  \\\n",
       "3                     负全部责任                  不负责任     1      贵A7287L   \n",
       "4                     负同等责任                 负同等责任     1      贵AU1522   \n",
       "6                     负全部责任                  不负责任     1      贵AAE424   \n",
       "8                     负全部责任                  不负责任     1      贵ANA964   \n",
       "9                     负全部责任                  不负责任     1      贵A5BH44   \n",
       "...                     ...                   ...   ...          ...   \n",
       "18036                 负同等责任                 负同等责任     1      贵A7294C   \n",
       "18037                 负全部责任                  不负责任     1      贵GT6092   \n",
       "18038                 负全部责任                  不负责任     1      贵HCU696   \n",
       "18039                 负全部责任                  不负责任     1      贵HV8443   \n",
       "18040                 负全部责任                  不负责任     1      贵B34129   \n",
       "\n",
       "      carcolor1  sex2 platenumber2  ... jxmc1   jxmc2          cclzrq1  \\\n",
       "3             黑     0      贵A7088C  ...  消防驾校  520116   2004-6-17 0:00   \n",
       "4            白色     1      贵A68C55  ...    自培      自培   2006-1-23 0:00   \n",
       "6            白色     1      贵GT7627  ...    自培   市警校驾校   2012-8-27 0:00   \n",
       "8            白色     1      贵A9930E  ...    自培    鑫鑫驾校   2004-4-13 0:00   \n",
       "9             黑     1      贵AU8621  ...    自培  520109    2006-6-9 0:00   \n",
       "...         ...   ...          ...  ...   ...     ...              ...   \n",
       "18036         红     1      贵CHT461  ...    自培      自培   2004-1-13 0:00   \n",
       "18037         黑     1      贵AAS408  ...    自培      自培  2002-11-11 0:00   \n",
       "18038         银     1      贵A67R99  ...    自培      自培   2002-4-19 0:00   \n",
       "18039         蓝     0      贵JDN385  ...    自培      自培   2003-5-22 0:00   \n",
       "18040        黑色     1      贵AYY148  ...    自培      自培   2002-4-15 0:00   \n",
       "\n",
       "               cclzrq2 clpp1  clpp2      driver1license driver2license  \\\n",
       "3       2008-5-29 0:00   众泰牌    长安牌            3.66E+17       3.65E+17   \n",
       "4       2012-9-14 0:00   大众牌    海马牌            3.67E+17       3.65E+17   \n",
       "6        2012-9-4 0:00   宝来牌    威志牌  36454651104640395X       3.65E+17   \n",
       "8      2013-12-17 0:00   朗逸牌    豪情牌            3.65E+17       3.65E+17   \n",
       "9       2009-9-17 0:00   长安牌    瑞麒牌            3.65E+17       3.66E+17   \n",
       "...                ...   ...    ...                 ...            ...   \n",
       "18036   2014-11-5 0:00   俊风牌  北京现代牌            3.65E+17       3.67E+17   \n",
       "18037  2001-12-31 0:00   英伦牌    银钢牌            3.56E+17       3.66E+17   \n",
       "18038   2014-2-17 0:00   长安牌  北京现代牌            3.65E+17       3.65E+17   \n",
       "18039  2000-12-27 0:00  纳智捷牌  东风标致牌            3.66E+17       3.67E+17   \n",
       "18040  2003-10-11 0:00   长城牌    五菱牌            3.55E+17       3.55E+17   \n",
       "\n",
       "        brith1   brith2  \n",
       "3      197512   197906   \n",
       "4      197209   197701   \n",
       "6      199402   198911   \n",
       "8      197202   197911   \n",
       "9      196810   197602   \n",
       "...        ...      ...  \n",
       "18036  198507   198202   \n",
       "18037  197206   198008   \n",
       "18038  196401   195712   \n",
       "18039  197905   196405   \n",
       "18040  197307   197202   \n",
       "\n",
       "[8956 rows x 21 columns]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.dropna(inplace=True)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "6206d5e5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>accidenttime</th>\n",
       "      <th>accidentaddr</th>\n",
       "      <th>driver1fault</th>\n",
       "      <th>driver1responsibility</th>\n",
       "      <th>driver2responsibility</th>\n",
       "      <th>sex1</th>\n",
       "      <th>platenumber1</th>\n",
       "      <th>carcolor1</th>\n",
       "      <th>sex2</th>\n",
       "      <th>platenumber2</th>\n",
       "      <th>...</th>\n",
       "      <th>jxmc1</th>\n",
       "      <th>jxmc2</th>\n",
       "      <th>cclzrq1</th>\n",
       "      <th>cclzrq2</th>\n",
       "      <th>clpp1</th>\n",
       "      <th>clpp2</th>\n",
       "      <th>driver1license</th>\n",
       "      <th>driver2license</th>\n",
       "      <th>brith1</th>\n",
       "      <th>brith2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2015-2-4 9:20</td>\n",
       "      <td>金阳</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7287L</td>\n",
       "      <td>黑</td>\n",
       "      <td>0</td>\n",
       "      <td>贵A7088C</td>\n",
       "      <td>...</td>\n",
       "      <td>消防驾校</td>\n",
       "      <td>520116</td>\n",
       "      <td>2004-6-17 0:00</td>\n",
       "      <td>2008-5-29 0:00</td>\n",
       "      <td>众泰牌</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197512</td>\n",
       "      <td>197906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2015-2-4 9:00</td>\n",
       "      <td>新华路</td>\n",
       "      <td>9、不符合前8款规定或者双方同时具有上述情形的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU1522</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A68C55</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2006-1-23 0:00</td>\n",
       "      <td>2012-9-14 0:00</td>\n",
       "      <td>大众牌</td>\n",
       "      <td>海马牌</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197209</td>\n",
       "      <td>197701</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2015-2-4 8:00</td>\n",
       "      <td>中山东路</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAE424</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT7627</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>市警校驾校</td>\n",
       "      <td>2012-8-27 0:00</td>\n",
       "      <td>2012-9-4 0:00</td>\n",
       "      <td>宝来牌</td>\n",
       "      <td>威志牌</td>\n",
       "      <td>36454651104640395X</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>199402</td>\n",
       "      <td>198911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2015-2-4 11:00</td>\n",
       "      <td>小河锦江路</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵ANA964</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A9930E</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>鑫鑫驾校</td>\n",
       "      <td>2004-4-13 0:00</td>\n",
       "      <td>2013-12-17 0:00</td>\n",
       "      <td>朗逸牌</td>\n",
       "      <td>豪情牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197202</td>\n",
       "      <td>197911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2015-2-3 21:40</td>\n",
       "      <td>柴林巷</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A5BH44</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU8621</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>520109</td>\n",
       "      <td>2006-6-9 0:00</td>\n",
       "      <td>2009-9-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>瑞麒牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>196810</td>\n",
       "      <td>197602</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8951</th>\n",
       "      <td>2015-5-10 22:26</td>\n",
       "      <td>贵开路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7294C</td>\n",
       "      <td>红</td>\n",
       "      <td>1</td>\n",
       "      <td>贵CHT461</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2004-1-13 0:00</td>\n",
       "      <td>2014-11-5 0:00</td>\n",
       "      <td>俊风牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>198507</td>\n",
       "      <td>198202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8952</th>\n",
       "      <td>2015-2-5 17:20</td>\n",
       "      <td>林城西路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT6092</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAS408</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-11-11 0:00</td>\n",
       "      <td>2001-12-31 0:00</td>\n",
       "      <td>英伦牌</td>\n",
       "      <td>银钢牌</td>\n",
       "      <td>3.56E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>197206</td>\n",
       "      <td>198008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8953</th>\n",
       "      <td>2015-4-16 12:30</td>\n",
       "      <td>金珠大道</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HCU696</td>\n",
       "      <td>银</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A67R99</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-19 0:00</td>\n",
       "      <td>2014-2-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196401</td>\n",
       "      <td>195712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8954</th>\n",
       "      <td>2015-2-12 13:01</td>\n",
       "      <td>蟠桃宫</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HV8443</td>\n",
       "      <td>蓝</td>\n",
       "      <td>0</td>\n",
       "      <td>贵JDN385</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2003-5-22 0:00</td>\n",
       "      <td>2000-12-27 0:00</td>\n",
       "      <td>纳智捷牌</td>\n",
       "      <td>东风标致牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>197905</td>\n",
       "      <td>196405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8955</th>\n",
       "      <td>2015-3-16 8:00</td>\n",
       "      <td>大理石路</td>\n",
       "      <td>8、依法应负全责的其他情形</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵B34129</td>\n",
       "      <td>黑色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AYY148</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-15 0:00</td>\n",
       "      <td>2003-10-11 0:00</td>\n",
       "      <td>长城牌</td>\n",
       "      <td>五菱牌</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>197307</td>\n",
       "      <td>197202</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8956 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         accidenttime accidentaddr             driver1fault  \\\n",
       "0       2015-2-4 9:20           金阳               7、未按规定让行的    \n",
       "1       2015-2-4 9:00          新华路  9、不符合前8款规定或者双方同时具有上述情形的   \n",
       "2       2015-2-4 8:00         中山东路                    1、追尾的   \n",
       "3      2015-2-4 11:00        小河锦江路                    1、追尾的   \n",
       "4      2015-2-3 21:40          柴林巷               7、未按规定让行的    \n",
       "...               ...          ...                      ...   \n",
       "8951  2015-5-10 22:26          贵开路               7、未按规定让行的    \n",
       "8952   2015-2-5 17:20         林城西路               7、未按规定让行的    \n",
       "8953  2015-4-16 12:30         金珠大道                    1、追尾的   \n",
       "8954  2015-2-12 13:01          蟠桃宫               7、未按规定让行的    \n",
       "8955   2015-3-16 8:00         大理石路            8、依法应负全责的其他情形   \n",
       "\n",
       "     driver1responsibility driver2responsibility  sex1 platenumber1 carcolor1  \\\n",
       "0                    负全部责任                  不负责任     1      贵A7287L         黑   \n",
       "1                    负同等责任                 负同等责任     1      贵AU1522        白色   \n",
       "2                    负全部责任                  不负责任     1      贵AAE424        白色   \n",
       "3                    负全部责任                  不负责任     1      贵ANA964        白色   \n",
       "4                    负全部责任                  不负责任     1      贵A5BH44         黑   \n",
       "...                    ...                   ...   ...          ...       ...   \n",
       "8951                 负同等责任                 负同等责任     1      贵A7294C         红   \n",
       "8952                 负全部责任                  不负责任     1      贵GT6092         黑   \n",
       "8953                 负全部责任                  不负责任     1      贵HCU696         银   \n",
       "8954                 负全部责任                  不负责任     1      贵HV8443         蓝   \n",
       "8955                 负全部责任                  不负责任     1      贵B34129        黑色   \n",
       "\n",
       "      sex2 platenumber2  ... jxmc1   jxmc2          cclzrq1          cclzrq2  \\\n",
       "0        0      贵A7088C  ...  消防驾校  520116   2004-6-17 0:00   2008-5-29 0:00   \n",
       "1        1      贵A68C55  ...    自培      自培   2006-1-23 0:00   2012-9-14 0:00   \n",
       "2        1      贵GT7627  ...    自培   市警校驾校   2012-8-27 0:00    2012-9-4 0:00   \n",
       "3        1      贵A9930E  ...    自培    鑫鑫驾校   2004-4-13 0:00  2013-12-17 0:00   \n",
       "4        1      贵AU8621  ...    自培  520109    2006-6-9 0:00   2009-9-17 0:00   \n",
       "...    ...          ...  ...   ...     ...              ...              ...   \n",
       "8951     1      贵CHT461  ...    自培      自培   2004-1-13 0:00   2014-11-5 0:00   \n",
       "8952     1      贵AAS408  ...    自培      自培  2002-11-11 0:00  2001-12-31 0:00   \n",
       "8953     1      贵A67R99  ...    自培      自培   2002-4-19 0:00   2014-2-17 0:00   \n",
       "8954     0      贵JDN385  ...    自培      自培   2003-5-22 0:00  2000-12-27 0:00   \n",
       "8955     1      贵AYY148  ...    自培      自培   2002-4-15 0:00  2003-10-11 0:00   \n",
       "\n",
       "     clpp1  clpp2      driver1license driver2license   brith1   brith2  \n",
       "0      众泰牌    长安牌            3.66E+17       3.65E+17  197512   197906   \n",
       "1      大众牌    海马牌            3.67E+17       3.65E+17  197209   197701   \n",
       "2      宝来牌    威志牌  36454651104640395X       3.65E+17  199402   198911   \n",
       "3      朗逸牌    豪情牌            3.65E+17       3.65E+17  197202   197911   \n",
       "4      长安牌    瑞麒牌            3.65E+17       3.66E+17  196810   197602   \n",
       "...    ...    ...                 ...            ...      ...      ...  \n",
       "8951   俊风牌  北京现代牌            3.65E+17       3.67E+17  198507   198202   \n",
       "8952   英伦牌    银钢牌            3.56E+17       3.66E+17  197206   198008   \n",
       "8953   长安牌  北京现代牌            3.65E+17       3.65E+17  196401   195712   \n",
       "8954  纳智捷牌  东风标致牌            3.66E+17       3.67E+17  197905   196405   \n",
       "8955   长城牌    五菱牌            3.55E+17       3.55E+17  197307   197202   \n",
       "\n",
       "[8956 rows x 21 columns]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.reset_index(inplace=True)\n",
    "data = data.drop('index',axis=1)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "00b65943",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>accidenttime</th>\n",
       "      <th>accidentaddr</th>\n",
       "      <th>driver1fault</th>\n",
       "      <th>driver1responsibility</th>\n",
       "      <th>driver2responsibility</th>\n",
       "      <th>sex1</th>\n",
       "      <th>platenumber1</th>\n",
       "      <th>carcolor1</th>\n",
       "      <th>sex2</th>\n",
       "      <th>platenumber2</th>\n",
       "      <th>...</th>\n",
       "      <th>jxmc1</th>\n",
       "      <th>jxmc2</th>\n",
       "      <th>cclzrq1</th>\n",
       "      <th>cclzrq2</th>\n",
       "      <th>clpp1</th>\n",
       "      <th>clpp2</th>\n",
       "      <th>driver1license</th>\n",
       "      <th>driver2license</th>\n",
       "      <th>brith1</th>\n",
       "      <th>brith2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2015-2-4 9:20</td>\n",
       "      <td>金阳</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7287L</td>\n",
       "      <td>黑</td>\n",
       "      <td>0</td>\n",
       "      <td>贵A7088C</td>\n",
       "      <td>...</td>\n",
       "      <td>消防驾校</td>\n",
       "      <td>520116</td>\n",
       "      <td>2004-6-17 0:00</td>\n",
       "      <td>2008-5-29 0:00</td>\n",
       "      <td>众泰牌</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197512</td>\n",
       "      <td>197906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2015-2-4 9:00</td>\n",
       "      <td>新华路</td>\n",
       "      <td>9、不符合前8款规定或者双方同时具有上述情形的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU1522</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A68C55</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2006-1-23 0:00</td>\n",
       "      <td>2012-9-14 0:00</td>\n",
       "      <td>大众牌</td>\n",
       "      <td>海马牌</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197209</td>\n",
       "      <td>197701</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2015-2-4 8:00</td>\n",
       "      <td>中山东路</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAE424</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT7627</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>市警校驾校</td>\n",
       "      <td>2012-8-27 0:00</td>\n",
       "      <td>2012-9-4 0:00</td>\n",
       "      <td>宝来牌</td>\n",
       "      <td>威志牌</td>\n",
       "      <td>36454651104640395X</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>199402</td>\n",
       "      <td>198911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2015-2-4 11:00</td>\n",
       "      <td>小河锦江路</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵ANA964</td>\n",
       "      <td>白色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A9930E</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>鑫鑫驾校</td>\n",
       "      <td>2004-4-13 0:00</td>\n",
       "      <td>2013-12-17 0:00</td>\n",
       "      <td>朗逸牌</td>\n",
       "      <td>豪情牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>197202</td>\n",
       "      <td>197911</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2015-2-3 21:40</td>\n",
       "      <td>柴林巷</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A5BH44</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AU8621</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>520109</td>\n",
       "      <td>2006-6-9 0:00</td>\n",
       "      <td>2009-9-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>瑞麒牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>196810</td>\n",
       "      <td>197602</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8951</th>\n",
       "      <td>2015-5-10 22:26</td>\n",
       "      <td>贵开路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>负同等责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A7294C</td>\n",
       "      <td>红</td>\n",
       "      <td>1</td>\n",
       "      <td>贵CHT461</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2004-1-13 0:00</td>\n",
       "      <td>2014-11-5 0:00</td>\n",
       "      <td>俊风牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>198507</td>\n",
       "      <td>198202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8952</th>\n",
       "      <td>2015-2-5 17:20</td>\n",
       "      <td>林城西路</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵GT6092</td>\n",
       "      <td>黑</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AAS408</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-11-11 0:00</td>\n",
       "      <td>2001-12-31 0:00</td>\n",
       "      <td>英伦牌</td>\n",
       "      <td>银钢牌</td>\n",
       "      <td>3.56E+17</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>197206</td>\n",
       "      <td>198008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8953</th>\n",
       "      <td>2015-4-16 12:30</td>\n",
       "      <td>金珠大道</td>\n",
       "      <td>1、追尾的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HCU696</td>\n",
       "      <td>银</td>\n",
       "      <td>1</td>\n",
       "      <td>贵A67R99</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-19 0:00</td>\n",
       "      <td>2014-2-17 0:00</td>\n",
       "      <td>长安牌</td>\n",
       "      <td>北京现代牌</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>3.65E+17</td>\n",
       "      <td>196401</td>\n",
       "      <td>195712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8954</th>\n",
       "      <td>2015-2-12 13:01</td>\n",
       "      <td>蟠桃宫</td>\n",
       "      <td>7、未按规定让行的</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵HV8443</td>\n",
       "      <td>蓝</td>\n",
       "      <td>0</td>\n",
       "      <td>贵JDN385</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2003-5-22 0:00</td>\n",
       "      <td>2000-12-27 0:00</td>\n",
       "      <td>纳智捷牌</td>\n",
       "      <td>东风标致牌</td>\n",
       "      <td>3.66E+17</td>\n",
       "      <td>3.67E+17</td>\n",
       "      <td>197905</td>\n",
       "      <td>196405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8955</th>\n",
       "      <td>2015-3-16 8:00</td>\n",
       "      <td>大理石路</td>\n",
       "      <td>8、依法应负全责的其他情形</td>\n",
       "      <td>负全部责任</td>\n",
       "      <td>不负责任</td>\n",
       "      <td>1</td>\n",
       "      <td>贵B34129</td>\n",
       "      <td>黑色</td>\n",
       "      <td>1</td>\n",
       "      <td>贵AYY148</td>\n",
       "      <td>...</td>\n",
       "      <td>自培</td>\n",
       "      <td>自培</td>\n",
       "      <td>2002-4-15 0:00</td>\n",
       "      <td>2003-10-11 0:00</td>\n",
       "      <td>长城牌</td>\n",
       "      <td>五菱牌</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>3.55E+17</td>\n",
       "      <td>197307</td>\n",
       "      <td>197202</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8956 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         accidenttime accidentaddr             driver1fault  \\\n",
       "0       2015-2-4 9:20           金阳               7、未按规定让行的    \n",
       "1       2015-2-4 9:00          新华路  9、不符合前8款规定或者双方同时具有上述情形的   \n",
       "2       2015-2-4 8:00         中山东路                    1、追尾的   \n",
       "3      2015-2-4 11:00        小河锦江路                    1、追尾的   \n",
       "4      2015-2-3 21:40          柴林巷               7、未按规定让行的    \n",
       "...               ...          ...                      ...   \n",
       "8951  2015-5-10 22:26          贵开路               7、未按规定让行的    \n",
       "8952   2015-2-5 17:20         林城西路               7、未按规定让行的    \n",
       "8953  2015-4-16 12:30         金珠大道                    1、追尾的   \n",
       "8954  2015-2-12 13:01          蟠桃宫               7、未按规定让行的    \n",
       "8955   2015-3-16 8:00         大理石路            8、依法应负全责的其他情形   \n",
       "\n",
       "     driver1responsibility driver2responsibility  sex1 platenumber1 carcolor1  \\\n",
       "0                    负全部责任                  不负责任     1      贵A7287L         黑   \n",
       "1                    负同等责任                 负同等责任     1      贵AU1522        白色   \n",
       "2                    负全部责任                  不负责任     1      贵AAE424        白色   \n",
       "3                    负全部责任                  不负责任     1      贵ANA964        白色   \n",
       "4                    负全部责任                  不负责任     1      贵A5BH44         黑   \n",
       "...                    ...                   ...   ...          ...       ...   \n",
       "8951                 负同等责任                 负同等责任     1      贵A7294C         红   \n",
       "8952                 负全部责任                  不负责任     1      贵GT6092         黑   \n",
       "8953                 负全部责任                  不负责任     1      贵HCU696         银   \n",
       "8954                 负全部责任                  不负责任     1      贵HV8443         蓝   \n",
       "8955                 负全部责任                  不负责任     1      贵B34129        黑色   \n",
       "\n",
       "      sex2 platenumber2  ... jxmc1   jxmc2          cclzrq1          cclzrq2  \\\n",
       "0        0      贵A7088C  ...  消防驾校  520116   2004-6-17 0:00   2008-5-29 0:00   \n",
       "1        1      贵A68C55  ...    自培      自培   2006-1-23 0:00   2012-9-14 0:00   \n",
       "2        1      贵GT7627  ...    自培   市警校驾校   2012-8-27 0:00    2012-9-4 0:00   \n",
       "3        1      贵A9930E  ...    自培    鑫鑫驾校   2004-4-13 0:00  2013-12-17 0:00   \n",
       "4        1      贵AU8621  ...    自培  520109    2006-6-9 0:00   2009-9-17 0:00   \n",
       "...    ...          ...  ...   ...     ...              ...              ...   \n",
       "8951     1      贵CHT461  ...    自培      自培   2004-1-13 0:00   2014-11-5 0:00   \n",
       "8952     1      贵AAS408  ...    自培      自培  2002-11-11 0:00  2001-12-31 0:00   \n",
       "8953     1      贵A67R99  ...    自培      自培   2002-4-19 0:00   2014-2-17 0:00   \n",
       "8954     0      贵JDN385  ...    自培      自培   2003-5-22 0:00  2000-12-27 0:00   \n",
       "8955     1      贵AYY148  ...    自培      自培   2002-4-15 0:00  2003-10-11 0:00   \n",
       "\n",
       "     clpp1  clpp2      driver1license driver2license  brith1  brith2  \n",
       "0      众泰牌    长安牌            3.66E+17       3.65E+17  197512  197906  \n",
       "1      大众牌    海马牌            3.67E+17       3.65E+17  197209  197701  \n",
       "2      宝来牌    威志牌  36454651104640395X       3.65E+17  199402  198911  \n",
       "3      朗逸牌    豪情牌            3.65E+17       3.65E+17  197202  197911  \n",
       "4      长安牌    瑞麒牌            3.65E+17       3.66E+17  196810  197602  \n",
       "...    ...    ...                 ...            ...     ...     ...  \n",
       "8951   俊风牌  北京现代牌            3.65E+17       3.67E+17  198507  198202  \n",
       "8952   英伦牌    银钢牌            3.56E+17       3.66E+17  197206  198008  \n",
       "8953   长安牌  北京现代牌            3.65E+17       3.65E+17  196401  195712  \n",
       "8954  纳智捷牌  东风标致牌            3.66E+17       3.67E+17  197905  196405  \n",
       "8955   长城牌    五菱牌            3.55E+17       3.55E+17  197307  197202  \n",
       "\n",
       "[8956 rows x 21 columns]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "for column in ['brith1','brith2']:\n",
    "    data[column] = pd.to_numeric(data[column])\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "e66d0aa7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "303"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['brith1'][0]-data['brith1'][1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8b229bb7",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
